<?php if ($user_data->status == 1) : ?>
<script type="text/javascript">
function share_image() {
  FB.ui({
    method: 'feed',
    app_id: <?php echo FB_APP_ID; ?>,
    link: '<?php echo FB_APP_URL . '&app_data=gallery,index,1,default,' . $user_data->id ?>',
    picture: '<?php echo FB_SHARE_PIC; ?>',
    name: '<?php echo FB_APP_TITLE; ?>',
    caption: '',
    description: '<?php echo $user_data->first_name . ' ' . mb_substr($user_data->last_name, 0, 1) .'.' ?> се кандидатира за ТийНЕТ парламент\'13! Гласувай, за да подкрепиш <?php echo $avatar->first_name . ' ' . mb_substr($avatar->last_name, 0, 1) .'.' ?>! Кандидатирай се и ти, отвоювай онлайн правата на твоето поколение в истинска парламентарна битка!'
  });
}
</script>
<?php endif; ?>
<div id="participate-avatar" class="avatar-style-<?php echo $user_data->avatar_data{0}; ?>">
  <?php
  $message = $this->lang->line('avatar_under_moderation');
  switch ($user_data->status) {
    case 0 :
      $message = $this->lang->line('avatar_under_moderation');
      break;
    case 1 :
      $message = $this->lang->line('avatar_accepted');
      break;
    case 2 :
      $message = $this->lang->line('avatar_rejected');
      break;
  }
  ?>
    <div id="first-part"><span>В интернет имам право <?php echo $first_parts[$user_data->first_part_sentence]; ?>...</span></div>
    <div id="second-part"><span>ако/доколкото <?php echo $user_data->personal_message; ?></span></div>
    <div id="personal-avatar-image"><img src="<?php echo base_url(); ?>uploads/<?php echo $user_data->filename; ?>" /></div>
    <div id="avatar-status-message"><?php echo $message; ?></div>
    <?php if ($user_data->status == 1) : ?>
    <div id="approved-avatar-section">
      <div id="personal-avatar-votes"><?php echo $user_data->votes; ?></div>
      <div class="clear-both"></div>
      <div id="personal-avatar-share" onclick="share_image()">Сподели</div>
    </div>
    <?php endif; ?>
    <?php if ($user_data->status == 2) : ?>
    <div id="restart-avatar-button"><?php echo anchor('participate/restart', "Опитай пак"); ?></div>
    <?php endif; ?>
    <div id="home-avatar-button"><?php echo anchor('tab', "Начало"); ?></div>
    <div id="gallery-avatar-button"><?php echo anchor('gallery', "Галерия"); ?></div>
</div>